import { getHeaders } from 'h3'

export default defineEventHandler(async (event) => {
  const reqHeaders = getHeaders(event)
  const ssrHeader = new Headers()
  const { app } = useRuntimeConfig()
  ssrHeader.set('cookie', reqHeaders.cookie)
  // ssrHeader.set('x-xsrf-token', app['XSRF_HEADER'])
  event.context.headers = ssrHeader
  event.context.baseUrl = app['BASE_URL']
})
